﻿namespace Jhong.FunMVC.Test
{
    public class Routes : IRoutes
    {
        public void RegisterRoutes()
        {
            RouteTable.MapRoute(
                    name: "default",
                    url: "{controller}/{action}/{id}",
                    defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
            RouteTable.MapRoute(
                    name: null,
                    url: "{controller}/Index/{id}",
                    defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                );
            RouteTable.MapRoute(
                    name: null,
                    url: "{controller}/{action}",
                    defaults: new { controller = "Home", action = "Index" }
                );
        }
    }
}